<?php


$config = new \Doctrine\ORM\Configuration();
$config->setMetadataCacheImpl(new \Doctrine\Common\Cache\ArrayCache);
$driverImpl = $config->newDefaultAnnotationDriver(array($dirBase."/Proyecto/Entidades"));
$config->setMetadataDriverImpl($driverImpl);

$config->setProxyDir($dirBase.'/Proyecto/Proxies');
$config->setProxyNamespace('Proxies');

$connectionOptions = array(
 	    'driver' => 'pdo_mysql',
	    'dbname' => 'workflow',
	    'user' => 'p2a',
	    'password' => 'p2a',
	    'host' => 'localhost'
);

$em = \Doctrine\ORM\EntityManager::create($connectionOptions, $config);


$helpers = array(
    'db' => new \Doctrine\DBAL\Tools\Console\Helper\ConnectionHelper($em->getConnection()),
    'em' => new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper($em)
);